<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The CairoImageSurface class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="cairosvgsurface.versiontostring.html">CairoSvgSurface::versionToString</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="cairoimagesurface.construct.html">CairoImageSurface::__construct</a></div>
 <div class="up"><a href="book.cairo.html">Cairo</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.cairoimagesurface" class="reference">

 <h1 class="title">The CairoImageSurface class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL cairo &gt;= 0.1.0)</p>


  <div class="section" id="cairoimagesurface.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    CairoImageSurface provide the ability to render to memory buffers either allocated by cairo or
    by the calling code. The supported image formats are those defined in <a href="class.cairoformat.html" class="classname">CairoFormat</a>.
   </p>
  </div>


  <div class="section" id="cairoimagesurface.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">CairoImageSurface</strong>
     </span>
     
     <span class="ooclass">
      <span class="modifier">extends</span>
      <a href="class.cairosurface.html" class="classname">CairoSurface</a>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="cairoimagesurface.construct.html" class="methodname">__construct</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$format</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$width</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$height</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="type">void</span><span class="methodname"><a href="cairoimagesurface.createfordata.html" class="methodname">createForData</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$format</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$width</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$height</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$stride</code><span class="initializer"> = -1</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="type">CairoImageSurface</span><span class="methodname"><a href="cairoimagesurface.createfrompng.html" class="methodname">createFromPng</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$file</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="cairoimagesurface.getdata.html" class="methodname">getData</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="cairoimagesurface.getformat.html" class="methodname">getFormat</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="cairoimagesurface.getheight.html" class="methodname">getHeight</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="cairoimagesurface.getstride.html" class="methodname">getStride</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="cairoimagesurface.getwidth.html" class="methodname">getWidth</a></span>
    ( <span class="methodparam">void</span>
   )</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 继承的方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="cairosurface.construct.html" class="methodname">CairoSurface::__construct</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="cairosurface.copypage.html" class="methodname">CairoSurface::copyPage</a></span>
    ( <span class="methodparam">void</span>
    )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="cairosurface.createsimilar.html" class="methodname">CairoSurface::createSimilar</a></span>
    ( <span class="methodparam"><span class="type"><a href="class.cairosurface.html" class="type CairoSurface">CairoSurface</a></span> <code class="parameter">$other</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$content</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$width</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$height</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="cairosurface.finish.html" class="methodname">CairoSurface::finish</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="cairosurface.flush.html" class="methodname">CairoSurface::flush</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="cairosurface.getcontent.html" class="methodname">CairoSurface::getContent</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span><span class="methodname"><a href="cairosurface.getdeviceoffset.html" class="methodname">CairoSurface::getDeviceOffset</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="cairosurface.getfontoptions.html" class="methodname">CairoSurface::getFontOptions</a></span>
    ( <span class="methodparam">void</span>
    )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="cairosurface.gettype.html" class="methodname">CairoSurface::getType</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="cairosurface.markdirty.html" class="methodname">CairoSurface::markDirty</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="cairosurface.markdirtyrectangle.html" class="methodname">CairoSurface::markDirtyRectangle</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$x</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$y</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$width</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$height</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="cairosurface.setdeviceoffset.html" class="methodname">CairoSurface::setDeviceOffset</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$x</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$y</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="cairosurface.setfallbackresolution.html" class="methodname">CairoSurface::setFallbackResolution</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$x</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$y</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="cairosurface.showpage.html" class="methodname">CairoSurface::showPage</a></span>
    ( <span class="methodparam">void</span>
    )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="cairosurface.status.html" class="methodname">CairoSurface::status</a></span>
    ( <span class="methodparam">void</span>
    )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="cairosurface.writetopng.html" class="methodname">CairoSurface::writeToPng</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$file</code></span>
   )</div>


   }</div>


  </div>

 </div>

 

























































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="cairoimagesurface.construct.html">CairoImageSurface::__construct</a> — Creates a new CairoImageSurface</li><li><a href="cairoimagesurface.createfordata.html">CairoImageSurface::createForData</a> — The createForData purpose</li><li><a href="cairoimagesurface.createfrompng.html">CairoImageSurface::createFromPng</a> — Creates a new CairoImageSurface form a png image file</li><li><a href="cairoimagesurface.getdata.html">CairoImageSurface::getData</a> — Gets the image data as string</li><li><a href="cairoimagesurface.getformat.html">CairoImageSurface::getFormat</a> — Get the image format</li><li><a href="cairoimagesurface.getheight.html">CairoImageSurface::getHeight</a> — Retrieves the height of the CairoImageSurface</li><li><a href="cairoimagesurface.getstride.html">CairoImageSurface::getStride</a> — The getStride purpose</li><li><a href="cairoimagesurface.getwidth.html">CairoImageSurface::getWidth</a> — Retrieves the width of the CairoImageSurface</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="cairosvgsurface.versiontostring.html">CairoSvgSurface::versionToString</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="cairoimagesurface.construct.html">CairoImageSurface::__construct</a></div>
 <div class="up"><a href="book.cairo.html">Cairo</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
